<!-- Begin time_sheet/add.tpl -->
<form method="post" action="?module=time_sheet&action=modify&sub={$smarty.get.sub}&idusr={$idusr}&extend={$extend}&closed={$closed}&ipid={$ipid}" enctype="multipart/form-data">
{opentable}
{titlebar colspan=4}
<tr>
	{$perio}	
</tr>
<tr>
	<td class="sectiontableentry2" width="20%" align="right" valign="middle">{$lg->group}<span class="required">*</span></td>
	<td class="sectiontableentry1" width="80%" colspan="3">
		<select name=gid onchange="form.submit()" >
			<option value="">{$lg->select_group}</option>
			{foreach from=$t_groups item=s_groups}	
				<option value="{$s_groups.gid}"{if $p_gid eq $s_groups.gid} selected {/if} >{$s_groups.name}</option>
			{/foreach}
		</select>	
	</td>
</tr>
<tr>
	<td class="sectiontableentry2" width="20%" align="right" valign="middle">{$lg->issue}<span class="required">*</span></td>
	<td class="sectiontableentry1" width="80%" colspan="3">
		<select name=iid  onChange="form.submit()">
			<option value="">{$lg->select_issue}</option>
			{foreach from=$t_issue item=s_issue}	
				<option value="{$s_issue.iid}" {if $p_iid eq $s_issue.iid} selected {/if} >{$s_issue.iid} - {$s_issue.ltext}</option >
			{/foreach}
		</select>
		<input type="submit" class="button" name="extend" value={$lg->extend} />
		{if permission_check("TS-clos-input")}
		<input type="submit" class="button" name="closed" value="{$lg->mm_show_closed}" />
		{/if}	
	</td>
</tr>
<tr>
	<td class="sectiontableentry2" width="20%" align="right" valign="middle">{$lg->task}{$ttask}<span class="required">*</span></td>
	<td class="sectiontableentry1" width="80%" colspan="3">
		<select name=ttask onChange="form.submit()">
			{foreach from=$t_task item=s_task}	
				<option value="{$s_task.ttask}" {if $s_task.ttask eq $ttask} selected {/if} >{$s_task.ttask} - {$s_task.vtext}</option >
			{/foreach}
		</select>	
	</td>
</tr>
<tr>
	<td class="sectiontableentry2" width="20%" align="right" valign="middle">{$lg->cost}<span class="required">*</span></td>
	<td class="sectiontableentry1" width="30%">
		<input type="text" size="5" maxlength="5" name="cost" value="{$p_cost}" />
		<select name="unit" width = "10">
			<option value="8" {if $unit eq '8'} selected {/if}>{$lg->timeD}</option>
			<option value="1" {if $unit eq '1'} selected {/if}>{$lg->timeH}</option>
		</select>
	</td>
	<td class="sectiontableentry2" width="10%" align="right" valign="middle">{$lg->rcost}</td>
	<td class="sectiontableentry1" width="50%">
		<input type="text" size="5" maxlength="5" name="rcost" value="{$p_rcost}" />
		<select name="runit" width = "10">
			<option value="8" {if $unit eq '8'} selected {/if}>{$lg->timeD}</option>
			<option value="1" {if $unit eq '1'} selected {/if}>{$lg->timeH}</option>
		</select>
	</td>
</tr>
<tr>
	<td class="sectiontableentry2" width="20%" align="right" valign="middle">{if $ttask eq 'INAC'}<span class="required">*</span>{/if} {$lg->comment}</td>
	<td class="sectiontableentry1" width="80%" colspan="3">
		<textarea name="incmt" rows="3">{$incmt}</textarea>
	</td>
</tr>
<tr>
	<td>
		{if $sub eq 'add'}
		<input type="submit" class="button" name="chval" value={$lg->add} />
		{else}
		<input type="submit" class="button" name="chupd" value={$lg->update} />
		<input type="submit" class="button" name="chval" value={$lg->add} />
		{/if}
	</td>
<tr>	
</table>
</form>
<div style="text-align: left; margin: 4px;"><span class="required">*</span> {$lg->required_fields}</div>
</table>
<!-- End time_sheet/add.tpl -->